{% load foundation_form %}

<div class="field-row large-12 columns{% if admin_field.errors %} error{% endif %}">
  <div class="row">
    <div class="small-3 columns">
      {% if show_label %}
        {% label field %}
      {% endif %}
    </div>
    <div class="small-9 end columns {% if field.errors %} error{% endif %}">
      {% if field.is_readonly %}
        <span class='read-only'>{{ field.contents|default:"-" }}</span>
      {% else %}
        {{ admin_field }}
      {% endif %}
      {% if admin_field.errors %}
        {% for error in admin_field.errors %}
          <small class="error">{{ error }}</small>
        {% endfor %}
      {% endif %}
      {% if admin_field.help_text %}
        <span class="help-text">
          <i
            class="fa fa-lg fa-info-circle has-tip tip-top"
            aria-hidden="true"
            data-tooltip
            aria-haspopup="true"
            title="{{ admin_field.help_text | escape }}"
          >
          </i>
          <span class="show-for-sr">{{ admin_field.help_text }}</span>
        </span>
      {% endif %}
    </div>
  </div>
</div>
